package health.lm.com.mine.present;


import health.lm.com.component_base.base.mvp.contract.XPresent;
import health.lm.com.mine.activity.AllianceBusinessActivity;
import health.lm.com.mine.activity.InfoWebviewActivity;
import health.lm.com.mine.entity.AboutUsEntity;
import health.lm.com.mine.entity.AllianceBusinessBean;
import health.lm.com.mine.entity.CardInfoEntity;
import health.lm.com.mine.entity.InstructionEntity;
import health.lm.com.mine.entity.JiFenEntity;
import health.lm.com.mine.model.MineModel;
import health.lm.com.network.callback.SimpleCallBack;

/**
 * 介绍说明webview
 */

public class InfoWebviewPresenter extends XPresent<InfoWebviewActivity> {
    /**卡券使用说明*/
    public void getCardInfo() {
        MineModel.getInstance().cardInfo(new SimpleCallBack<CardInfoEntity>() {
            @Override
            public void onSuccess(CardInfoEntity cardInfoEntity) {
                if (hasV()){
                    getV().getCardInfoSuccess(cardInfoEntity);
                }
            }
        });
    }
    /**卡券使用说明*/
    public void getAboutUs() {
        MineModel.getInstance().aboutUs(new SimpleCallBack<AboutUsEntity>() {
            @Override
            public void onSuccess(AboutUsEntity entity) {
                if (hasV()){
                    getV().getAboutUsSuccess(entity);
                }
            }
        });
    }
    /**卡券使用说明*/
    public void getInstrution() {
        MineModel.getInstance().instructions(new SimpleCallBack<InstructionEntity>() {
            @Override
            public void onSuccess(InstructionEntity entity) {
                if (hasV()){
                    getV().getInstructionSuccess(entity);
                }
            }
        });
    }
    /**积分说明*/
    public void getJiFen() {
        MineModel.getInstance().jifensm(new SimpleCallBack<JiFenEntity>() {
            @Override
            public void onSuccess(JiFenEntity entity) {
                if (hasV()){
                    getV().getJifensm(entity);
                }
            }
        });
    }

    /**
     * 注册协议
     */
    public void getRegisterAgreement() {
        MineModel.getInstance().getRegisterAgreement(new SimpleCallBack<JiFenEntity>() {
            @Override
            public void onSuccess(JiFenEntity entity) {
                if (hasV()){
                    getV().getRegisterAgreement(entity);
                }
            }
        });
    }
}
